DevForce Help Reference
Restore(Type,String,IEnumerable<Type>,Boolean) Method


The type of object being 'restored'
File containing a serialized object
List of known types in the serialized object
True to restore a file in binary format; false if the file is in text format.
Static (Shared in Visual Basic) method which creates and loads an object from the file specified.
Syntax
'Declaration
 
Public Overloads Shared Function Restore( _
   ByVal instanceType As Type, _
   ByVal fileName As String, _
   Optional ByVal knownTypes As IEnumerable(Of Type), _
   Optional ByVal useBinaryFormat As Boolean _
) As Object
'Usage
 
Dim instanceType As Type
Dim fileName As String
Dim knownTypes As IEnumerable(Of Type)
Dim useBinaryFormat As Boolean
Dim value As Object
 
value = SerializationFns.Restore(instanceType, fileName, knownTypes, useBinaryFormat)

Parameters

instanceType
The type of object being 'restored'
fileName
File containing a serialized object
knownTypes
List of known types in the serialized object
useBinaryFormat
True to restore a file in binary format; false if the file is in text format.

Return Value

A deserialized object
Remarks
Use Restore to deserialize an object which was previously saved to a file.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

SerializationFns Class
SerializationFns Members
Overload List

Send Feedback